import 'dart:convert';

List<MostReadBook> mostReadBookFromJson(String str) => List<MostReadBook>.from(
    json.decode(str).map((x) => MostReadBook.fromJson(x)));

String mostReadBookToJson(List<MostReadBook> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class MostReadBook {
  MostReadBook(
      {this.imageLink,
      this.createTime,
      this.id,
      this.bookLevel,
      this.bookTitle,
      this.bookCode,
      this.traditionalTitle});

  String? imageLink;
  int? createTime;
  String? id;
  String? bookTitle;
  String? bookLevel;
  String? bookCode;
  String? traditionalTitle;

  factory MostReadBook.fromJson(Map<String, dynamic> json) => MostReadBook(
        imageLink: json["imageLink"],
        createTime: json["createTime"],
        id: json["id"],
        bookCode: json["bookCode"],
        bookTitle: json["bookTitle"],
        traditionalTitle: json["traditionalTitle"],
        bookLevel: json["bookLevel"],
      );

  Map<String, dynamic> toJson() => {
        "imageLink": imageLink,
        "createTime": createTime,
        "id": id,
        "bookCode": bookCode,
        "bookTitle": bookTitle,
        "bookLevel": bookLevel,
        "traditionalTitle": traditionalTitle,
      };
}
